<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0px;
            padding: 0px;
        }

        #app {
            width: 100%;
            background-color: antiquewhite;
            overflow: hidden;
        }

        .searchbox {
            margin: 10px;
            display: flex;
        }

        .searchbox input {
            flex: 1;
            border: none;
            border-radius: 10px;
            outline: none;
            height: 35px;
        }

        .searchbox span {
            display: inline-block;
            height: 28px;
            width: 40px;
            line-height: 28px;
            padding-left: 10px;
            font-weight: bolder;
            color: skyblue;
        }

        .block {
            margin: 10px;
        }

        .block .title {
            font-weight: bolder;
        }

        .block .list {
            margin: 10px 10px;
            display: flex;
            flex-wrap: wrap;
        }
        .block .list span {
            display: inline-block;
            height: 25px;
            line-height: 25px;
            margin: 5px 5px;
            padding: 2px 2px ;
            border-radius: 10px;
            background-color: azure;
            font-size: 12px;
        }
    </style>
</head>
<body>
    <div id="app">
        <div class="searchbox">
            <input type="text" placeholder="请输入您要搜索的关键字" v-model="searchText">
            <span @click="search">搜索</span>
        </div>
        <div class="block">
            <div class="title">历史搜索</div>
            <div class="list">
                <span v-for="(item,index) in searchArr"> {{item}} </span>
            </div>
        </div>
    </div>

    <script src="./vue-2.5.21.js"></script>
    <script src="./1.搜索.js"></script>
    
</body>
</html>